#!/bin/bash
SUBMODULE_PATH=/home/gaoweii/Gitee/web_admin/terminal/third_party

# libco
build_libco() {
    cd $SUBMODULE_PATH/libco
    rm -rf build
    rm -rf lib
    rm -rf solib
    make
}

# mockcpp
build_mockcpp() {
    cd $SUBMODULE_PATH/mockcpp
    rm -rf build
    rm -rf build_GNU
    ./build.sh g++ 11
}

# googletest
build_googletest() {
    cd $SUBMODULE_PATH/googletest
    rm -rf build
    mkdir build
    cd build
    cmake ..
    make
}

build_third_party() {
    build_libco
    build_mockcpp
    build_googletest
}
